Register above for Internet.com profile. Forum registration click here
VBForums  

VB Wire News
.NET Tip: Passing a Variable Number of Arguments to a Method
Auto Increment the Version Number after Each Build in a Visual Studio Project
Visual Studio 2008 to Ship by Month's End
Object-Oriented Programming With Visual Basic .NET: Introduction
Explore an overloading method in VB.NET



Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier
Register FAQ Members List Calendar Today's Posts VB Jobs

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old Yesterday, 08:08 PM   #1
lintz
PowerPoster
 
lintz's Avatar
 
Join Date: Mar 03
Location: The 19th Hole
Posts: 2,402
lintz has a spectacular aura about (125+)lintz has a spectacular aura about (125+)
Resolved [RESOLVED] Submitting form issue

I'm trying to submit a form within the Webbrowser control but I can't find the 'name' or 'id' of the submit button. I can insert the Stock Code into the 'securityCode' filed but can't sumbit the form

Below is the form and what I've tried without any luck.

HTML Code:
WB1.Document.getElementById("DetailedQuoteForm").submit and WB1.Document.getElementById("DetailedQuoteForm").Click

HTML Code:
<form name="DetailedQuoteForm" method="post" action="/do/secure/detailedQuote"> <input type="hidden" name="submit" value="true" /> <table class="selector-outer" summary="ASX Codes"> <tr> <td> <table class="selector-inner" summary="ASX Codes"> <tr> <td> <label for="inputasxcode">ASX Codes:</label> </td> <td> <input type="text" name="securityCode" maxlength="6" size="10" value="" id="inputasxcode" /> </td> <td> <span class="codesearch">(<a href="companyInfoSearch?url=detailedQuote_submit=true">Search for ASX Code</a>)</span> </td> <td> <input type="submit" value="Refresh" class="button" alt="Refresh" /> </td> </tr> </table> </td> </tr> </table> </form>
lintz is online now   Reply With Quote
Old Today, 12:04 AM   #2
Fazi
Frenzied Member
 
Fazi's Avatar
 
Join Date: Aug 05
Location: Kandy - Sri Lanka
Posts: 1,503
Fazi has a spectacular aura about (125+)Fazi has a spectacular aura about (125+)
Re: Submitting form issue

Lintz, try
Code:
Dim HTML As HTMLDocument Dim sb As HTMLButtonElement Set HTML = wb1.Document Set sb = HTML.getElementsByName("submit").Item sb.Click
__________________
Please Rate my Post if I helped you !
Rating is Simple. Click (Rate) link on my post which helped you.

MCP - Windows 2000 Prof & Server

SendMessage Blaster :: Set Text to Yahoo Messanger Input Window :: Move System Tray, Start Button etc.

We code for Food.
Fazi is online now   Reply With Quote
Old Today, 04:23 AM   #3
lintz
PowerPoster
 
lintz's Avatar
 
Join Date: Mar 03
Location: The 19th Hole
Posts: 2,402
lintz has a spectacular aura about (125+)lintz has a spectacular aura about (125+)
Re: Submitting form issue

I get an error message - "user-defined type not defined" with the below line highlighted.

Code:
Dim HTML As HTMLDocument
lintz is online now   Reply With Quote
Old Today, 04:51 AM   #4
Fazi
Frenzied Member
 
Fazi's Avatar
 
Join Date: Aug 05
Location: Kandy - Sri Lanka
Posts: 1,503
Fazi has a spectacular aura about (125+)Fazi has a spectacular aura about (125+)
Re: Submitting form issue

You need to add the referrence to "Microsoft HTML Object Library " under project > reference . please try.
__________________
Please Rate my Post if I helped you !
Rating is Simple. Click (Rate) link on my post which helped you.

MCP - Windows 2000 Prof & Server

SendMessage Blaster :: Set Text to Yahoo Messanger Input Window :: Move System Tray, Start Button etc.

We code for Food.
Fazi is online now   Reply With Quote
Old Today, 05:09 AM   #5
lintz
PowerPoster
 
lintz's Avatar
 
Join Date: Mar 03
Location: The 19th Hole
Posts: 2,402
lintz has a spectacular aura about (125+)lintz has a spectacular aura about (125+)
Re: Submitting form issue

Added reference and goes through your code without error but after 'sb.click' nothing happens. It's like the button hasn't been pressed?
lintz is online now   Reply With Quote
Old Today, 05:13 AM   #6
Fazi
Frenzied Member
 
Fazi's Avatar
 
Join Date: Aug 05
Location: Kandy - Sri Lanka
Posts: 1,503
Fazi has a spectacular aura about (125+)Fazi has a spectacular aura about (125+)
Re: Submitting form issue

lintz, is this the button ?
<input type="hidden" name="submit" value="true" />

Is really the button is hidden ?
__________________
Please Rate my Post if I helped you !
Rating is Simple. Click (Rate) link on my post which helped you.

MCP - Windows 2000 Prof & Server

SendMessage Blaster :: Set Text to Yahoo Messanger Input Window :: Move System Tray, Start Button etc.

We code for Food.

Last edited by Fazi : Today at 05:16 AM.
Fazi is online now   Reply With Quote
Old Today, 05:14 AM   #7
lintz
PowerPoster
 
lintz's Avatar
 
Join Date: Mar 03
Location: The 19th Hole
Posts: 2,402
lintz has a spectacular aura about (125+)lintz has a spectacular aura about (125+)
Resolved Re: Submitting form issue

Got it to work

vb Code:
  1. Dim HTML As HTMLDocument
  2. Dim sb As HTMLFormElement
  3.  
  4. Set HTML = WB1.Document
  5.  
  6. Set sb = HTML.Forms("DetailedQuoteForm", 0)
  7. sb.submit
lintz is online now   Reply With Quote
Old Today, 05:17 AM   #8
Fazi
Frenzied Member
 
Fazi's Avatar
 
Join Date: Aug 05
Location: Kandy - Sri Lanka
Posts: 1,503
Fazi has a spectacular aura about (125+)Fazi has a spectacular aura about (125+)
Re: [RESOLVED] Submitting form issue

Cool
__________________
Please Rate my Post if I helped you !
Rating is Simple. Click (Rate) link on my post which helped you.

MCP - Windows 2000 Prof & Server

SendMessage Blaster :: Set Text to Yahoo Messanger Input Window :: Move System Tray, Start Button etc.

We code for Food.
Fazi is online now   Reply With Quote
Reply


Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier

Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
Fazi

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:24 AM.



Acceptable Use Policy

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2007 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers

Powered by vBulletin® Version 3.5.7
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
Copyright Jupitermedia Corp. 2002-2007